<?php /* Create Lesson Controller */
	require_once('modules/lessons/actions/create/scripts/validate-lesson.php');
	if (isset($_POST['form-action'])) {
		$validacion = validarClase();
		if (!empty($validacion)) { //fallo validacion
			require_once('modules/lessons/actions/create/view/create-lesson.php');
		} else { //si valido correcto
			$last_id = $lesson->insert('clases');
			//$lesson->addlessonToTeacher($last_id,1);
			//$lesson->sendEmail();
			require_once('modules/lessons/actions/list/index.php');
		}
	} else require_once('modules/lessons/actions/create/view/create-lesson.php');
?>